package com.klangner.animation.sprites
{
	import com.klangner.move.path.IPath;
	
	import flash.filters.BlurFilter;

  public class Ball extends MovableSprite {

    private var _radius:Number;
    private var _color:uint;
    

    public function Ball(path:IPath) {
      super(path);
      _radius = 40;
      _color = 0xff0000;
      
      paint();
    }
    
    public function set color(newColor:uint):void{
      _color = newColor;
      paint();
    }
    
    private function paint():void {
      graphics.clear();
      graphics.beginFill(_color);
      graphics.drawCircle(0, 0, _radius);
      graphics.endFill();
      
      var blur:BlurFilter = new BlurFilter(5, 5, 3);
      var filters:Array = new Array();
      filters.push(blur);
      this.filters = filters;
      
    }
  }

}